# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.DataCatalog.V1.Model.GoogleCloudDatacatalogV1SearchCatalogRequestScope do
  @moduledoc """
  The criteria that select the subspace used for query matching.

  ## Attributes

  *   `includeGcpPublicDatasets` (*type:* `boolean()`, *default:* `nil`) - If `true`, include Google Cloud public datasets in search results. By default, they are excluded. See [Google Cloud Public Datasets](/public-datasets) for more information.
  *   `includeOrgIds` (*type:* `list(String.t)`, *default:* `nil`) - The list of organization IDs to search within. To find your organization ID, follow the steps from [Creating and managing organizations] (/resource-manager/docs/creating-managing-organization).
  *   `includeProjectIds` (*type:* `list(String.t)`, *default:* `nil`) - The list of project IDs to search within. For more information on the distinction between project names, IDs, and numbers, see [Projects](/docs/overview/#projects).
  *   `includePublicTagTemplates` (*type:* `boolean()`, *default:* `nil`) - Optional. This field is deprecated. The search mechanism for public and private tag templates is the same.
  *   `restrictedLocations` (*type:* `list(String.t)`, *default:* `nil`) - Optional. The list of locations to search within. If empty, all locations are searched. Returns an error if any location in the list isn't one of the [Supported regions](https://cloud.google.com/data-catalog/docs/concepts/regions#supported_regions). If a location is unreachable, its name is returned in the `SearchCatalogResponse.unreachable` field. To get additional information on the error, repeat the search request and set the location name as the value of this parameter.
  *   `starredOnly` (*type:* `boolean()`, *default:* `nil`) - Optional. If `true`, search only among starred entries. By default, all results are returned, starred or not.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :includeGcpPublicDatasets => boolean() | nil,
          :includeOrgIds => list(String.t()) | nil,
          :includeProjectIds => list(String.t()) | nil,
          :includePublicTagTemplates => boolean() | nil,
          :restrictedLocations => list(String.t()) | nil,
          :starredOnly => boolean() | nil
        }

  field(:includeGcpPublicDatasets)
  field(:includeOrgIds, type: :list)
  field(:includeProjectIds, type: :list)
  field(:includePublicTagTemplates)
  field(:restrictedLocations, type: :list)
  field(:starredOnly)
end

defimpl Poison.Decoder,
  for: GoogleApi.DataCatalog.V1.Model.GoogleCloudDatacatalogV1SearchCatalogRequestScope do
  def decode(value, options) do
    GoogleApi.DataCatalog.V1.Model.GoogleCloudDatacatalogV1SearchCatalogRequestScope.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.DataCatalog.V1.Model.GoogleCloudDatacatalogV1SearchCatalogRequestScope do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
